from django.conf.urls.defaults import patterns,url
from kalapankki.album import views
urlpatterns = patterns('',
    url(r'^show/$', views.show_albums, name="show_albums"),
    url(r'^show/public/$', views.show_albums, {"public_only":True}, name="show_public_albums"),
    url(r'^show/album_(?P<album_id>\d+)/$', views.show, name="show_album"),
    url(r'^show/album_(?P<album_id>\d+)/page_(?P<page_number>\d+)/$', views.show, name="show_page"),
    url(r'^show/picture/(?P<picture_id>\d+)/$', views.show_pictures, name="show_picture"),
    
    url(r'^post/album_(?P<album_id>\d+)/$', views.post_to_facebook, name="post_to_facebook"),

    #url(r'^add/caption/$', views.add_caption, name="add_caption"),
    url(r'^add/album/$', views.add, name="add_album"),
    url(r'^add/album_(?P<album_id>\d+)/page/$', views.add, name="add_page"),
    url(r'^add/album_(?P<album_id>\d+)/page_(?P<page_id>\d+)/$', views.add, name="choose_picture"),
    url(r'^add/album_(?P<album_id>\d+)/page_(?P<page_id>\d+)/picture_(?P<picture_id>\d+)/$', views.add, name="add_picture"),
    
    url(r'^remove/(?P<album_id>\d+)/$', views.remove, name="remove_album"),
    url(r'^remove/(?P<album_id>\d+)/(?P<page_id>\d+)/$', views.remove, name="remove_page"),
    url(r'^remove/(?P<album_id>\d+)/(?P<page_id>\d+)/(?P<picture_id>\d+)/$', views.remove, name="remove_picture"),
    
    url(r'^pictures/$', views.show_pictures, name="show_pictures"),
    url(r'^picture/delete/(?P<picture_id>\d+)/$', views.delete_picture, name="delete_picture"),
    url(r'^picture/upload/$', views.upload_picture, name="upload_new_picture"),
    url(r'^picture/new/$', views.add_new_picture, name="add_new_picture"),
    
    url(r'^public_link/create/album_(?P<album_id>\d+)/$', views.public_link, name="create_public_link"),
    url(r'^public_link/remove/album_(?P<album_id>\d+)/$', views.public_link, {'remove':True}, name="remove_public_link"),
)                       
